<?php /* Smarty version Smarty3-RC3, created on 2013-10-10 09:59:31
         compiled from ".\templates\vepaariBookListNew.tpl" */ ?>
<?php /*%%SmartyHeaderCode:2755252567a833296d2-99529613%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '226764bbd678758957064d8b7531dd5d2e21cf4a' => 
    array (
      0 => '.\\templates\\vepaariBookListNew.tpl',
      1 => 1381399169,
    ),
  ),
  'nocache_hash' => '2755252567a833296d2-99529613',
  'function' => 
  array (
  ),
  'has_nocache_code' => false,
)); /*/%%SmartyHeaderCode%%*/?>
<?php if (!is_callable('smarty_function_html_options')) include 'D:\Program Files\Apache Software Foundation\Apache2.2\htdocs\sil1\include\Smarty\libs\plugins\function.html_options.php';
if (!is_callable('smarty_function_html_select_date')) include 'D:\Program Files\Apache Software Foundation\Apache2.2\htdocs\sil1\include\Smarty\libs\plugins\function.html_select_date.php';
if (!is_callable('smarty_modifier_string_format')) include 'D:\Program Files\Apache Software Foundation\Apache2.2\htdocs\sil1\include\Smarty\libs\plugins\modifier.string_format.php';
if (!is_callable('smarty_modifier_date_format')) include 'D:\Program Files\Apache Software Foundation\Apache2.2\htdocs\sil1\include\Smarty\libs\plugins\modifier.date_format.php';
?><?php if ($_GET['print']!=1){?>
  <?php $_template = new Smarty_Internal_Template("header.tpl", $_smarty_tpl->smarty, $_smarty_tpl, $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null);
 echo $_template->getRenderedTemplate();?><?php $_template->updateParentVariables(0);?><?php unset($_template);?>
<?php }else{ ?>
  <?php $_template = new Smarty_Internal_Template("headerPrint.tpl", $_smarty_tpl->smarty, $_smarty_tpl, $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null);
 echo $_template->getRenderedTemplate();?><?php $_template->updateParentVariables(0);?><?php unset($_template);?>
<?php }?>
<style>
.aavakColor
{
  color:red;
}
.javakColor
{
  color:green;
}
</style>
<script type="text/javascript">
function deleteRow(vepaariBookDetailId)
{
  if(confirm("Warning: Are you sure?\nDeletion is permanent. Continue anyway.") && confirm("Warning: Are you sure?\nDeletion is permanent. Continue anyway."))
  {
    location.href = "vepaaribillDelete.php?vepaariBookDetailId="+vepaariBookDetailId;
  }
}
function bookFunction(id)
{
  document.form1.bdate.value="0";
  document.form1.submit();
}
</script>
<form name="form1" action="" method="post">
<input type="hidden" name="bdate" id="bdate" value="0" />
<center><h4>Vepaari Detail</h4></center>
<div class="contentDiv">
  <table border="0" align="center" width="100%" cellspacing="0" cellpadding="0">
    <tr><td colspan="10"><hr COLOR="#000000" /></td></tr>
  <tr>
    <td class="table1">
      Party  : 
      <select name="party" onchange="bookFunction();">
        <?php ob_start();?><?php echo $_smarty_tpl->getVariable('partyId')->value;?>
<?php $_tmp1=ob_get_clean();?><?php echo smarty_function_html_options(array('values'=>$_smarty_tpl->getVariable('party')->value['partyId'],'output'=>$_smarty_tpl->getVariable('party')->value['partyName'],'selected'=>$_tmp1),$_smarty_tpl->smarty,$_smarty_tpl);?>

      </select>
    </td>
    <td colspan="9" class="table1" nowrap>
      From :
      <?php echo smarty_function_html_select_date(array('prefix'=>"fromDate",'start_year'=>"-2",'end_year'=>"+1",'field_order'=>"DMY",'day_value_format'=>"%02d",'time'=>$_smarty_tpl->getVariable('fromDateSelected')->value),$_smarty_tpl->smarty,$_smarty_tpl);?>

      To: 
      <?php echo smarty_function_html_select_date(array('prefix'=>"toDate",'start_year'=>"-2",'end_year'=>"+1",'field_order'=>"DMY",'day_value_format'=>"%02d",'time'=>$_smarty_tpl->getVariable('toDate')->value),$_smarty_tpl->smarty,$_smarty_tpl);?>
   
      <input type="submit" name="submitBtn" value="Find" />
      <?php if ($_GET['print']!=1){?>
        <a href="vepaariBookListNew.php?print=1&fromDate=<?php echo $_smarty_tpl->getVariable('fromDateSelected')->value;?>
&toDate=<?php echo $_smarty_tpl->getVariable('toDate')->value;?>
&party=<?php echo $_smarty_tpl->getVariable('partyId')->value;?>
">Print</a>
      <?php }else{ ?>
        &nbsp;
      <?php }?>
    </td>
  </tr>
    <?php if ($_GET['print']!=1){?>
  <?php }else{ ?>
  <tr class="table2">
    <td colspan="10"><hr COLOR="#000000" /></td></tr>
  <?php }?>
  <tr class="table1" >
    <th align="center" colspan="2" class="aavakColor">Aavak</th>
  </tr>
  <tr>  
    <td vAlign="top" colspan="2">
     <table border="1" align="center" width="100%" cellspacing="0" cellpadding="1" class="aavakColor">
       <tr class="table1">  
         <?php if ($_GET['print']!=1){?>
           <td width="8%">&nbsp;</td>
         <?php }else{ ?>
           &nbsp;
         <?php }?>
         <td width="10%" align="center" style="border-right:1px;">Date</td>
         <td width="27%" align="center" style="border-right:1px;" >Particulars</td>
         <td width="8%" align="center" style="border-right:1px;" >N.Wght</td>
         <td width="8%" align="center" style="border-right:1px;" >Touch</td>
         <td width="8%" align="center" style="border-right:1px;" >Waste</td>
         <td width="8%" align="center" style="border-right:1px;" >Fine</td>
         <td width="8%" align="center" style="border-right:1px;" >Qty</td>
         <td width="8%" align="center" style="border-right:1px;" >Labour</td>
         <td align="center" style="border-right:1px;" >Amt</td>
       </tr>
       <tr class="table1">
         <?php if ($_GET['print']!=1){?>
      	   <td>&nbsp;</td>
      	 <?php }?>
         <td style="border-right:1px;">&nbsp;&nbsp;</td>
         <td style="border-right:1px;">&nbsp;&nbsp;</td>
      	 <td style="border-right:1px;">&nbsp;&nbsp;Opening</td>
      	 <td style="border-right:1px;">&nbsp;</td>
      	 <td style="border-right:1px;">&nbsp;</td>
      	 <td style="border-right:1px;">&nbsp;</td>
      	 <td style="border-right:1px;">&nbsp;</td>
         <td style="border-right:1px;" align="right"><?php if ($_smarty_tpl->getVariable('openingFinalFineCr')->value!=0){?><?php echo smarty_modifier_string_format($_smarty_tpl->getVariable('openingFinalFineCr')->value,"%.0f");?>
<?php }else{ ?>&nbsp;<?php }?></td>
         <td style="border-right:1px;" align="right"><?php if ($_smarty_tpl->getVariable('openingFinalAmountCr')->value!=0){?><?php echo smarty_modifier_string_format($_smarty_tpl->getVariable('openingFinalAmountCr')->value,"%.0f");?>
<?php }else{ ?>&nbsp;<?php }?></td>
      </tr>
      <?php unset($_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]);
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['name'] = "sec";
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['loop'] = is_array($_loop=count($_smarty_tpl->getVariable('billDetailCreditArray')->value)) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['show'] = true;
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['max'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['loop'];
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['step'] = 1;
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['start'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['step'] > 0 ? 0 : $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['loop']-1;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['show']) {
    $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['total'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['loop'];
    if ($_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['total'] == 0)
        $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['show'] = false;
} else
    $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['total'] = 0;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['show']):

            for ($_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['index'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['start'], $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['iteration'] = 1;
                 $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['iteration'] <= $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['total'];
                 $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['index'] += $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['step'], $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['iteration']++):
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['rownum'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['iteration'];
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['index_prev'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['index'] - $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['index_next'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['index'] + $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['first']      = ($_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['iteration'] == 1);
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['last']       = ($_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['iteration'] == $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['total']);
?>
        <?php if ($_smarty_tpl->getVariable('smarty')->value['section']['sec']['index']!=0&&$_smarty_tpl->getVariable('billDetailCreditArray')->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec']['index']]['vepaariBookMasterId']!=$_smarty_tpl->getVariable('billDetailCreditArray')->value['sec'-1]['vepaariBookMasterId']){?>
                  <?php }?>
      <tr>
      
      <?php if ($_GET['print']!=1){?>
        <td width="150">
          <?php if ($_smarty_tpl->getVariable('billDetailCreditArray')->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec']['index']]['vepaariBookMasterId']!=$_smarty_tpl->getVariable('billDetailCreditArray')->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec']['index']-1]['vepaariBookMasterId']){?>
            <a href="vepaariBookListNewAavak.php?print=1&vepaariBookMasterId=<?php echo $_smarty_tpl->getVariable('billDetailCreditArray')->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec']['index']]['vepaariBookMasterId'];?>
&partyId=<?php echo $_smarty_tpl->getVariable('billDetailCreditArray')->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec']['index']]['partyId'];?>
&vepaariBookDate=<?php echo $_smarty_tpl->getVariable('billDetailCreditArray')->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec']['index']]['vepaariBookDate'];?>
">Print</a>
          <?php }else{ ?>
            &nbsp;
          <?php }?>
          <?php if ($_smarty_tpl->getVariable('billDetailCreditArray')->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec']['index']]['vepaariBookMasterId']!=$_smarty_tpl->getVariable('billDetailCreditArray')->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec']['index']-1]['vepaariBookMasterId']){?><a href="javascript:deleteRow(<?php echo $_smarty_tpl->getVariable('billDetailCreditArray')->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec']['index']]['vepaariBookDetailId'];?>
)"><img src="./images/b_drop.png" border="0" width="15" height="15"></a>
          <?php }else{ ?>
            &nbsp;
          <?php }?>
          <?php if ($_smarty_tpl->getVariable('billDetailCreditArray')->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec']['index']]['vepaariBookMasterId']!=$_smarty_tpl->getVariable('billDetailCreditArray')->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec']['index']-1]['vepaariBookMasterId']){?><a href="vepaariBookAavak.php?vepaariBookMasterId=<?php echo $_smarty_tpl->getVariable('billDetailCreditArray')->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec']['index']]['vepaariBookMasterId'];?>
"><img src="./images/b_edit.png" border="0" width="15" height="15"></a>
          <?php }else{ ?>
            &nbsp;
          <?php }?>
      <?php }else{ ?>
        &nbsp;
      <?php }?>
      </td>
        <td align="center" style="border-right:1px;" NOWRAP>&nbsp;<?php echo smarty_modifier_date_format($_smarty_tpl->getVariable('billDetailCreditArray')->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec']['index']]['vepaariBookDate'],"%d-%m-%Y");?>
</td>
        <td align="left" style="border-right:1px;"><?php echo $_smarty_tpl->getVariable('billDetailCreditArray')->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec']['index']]['particulars'];?>
</td>
        <td align="right" style="border-right:1px;"><?php if ($_smarty_tpl->getVariable('billDetailCreditArray')->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec']['index']]['netWeight']!=0){?><?php echo smarty_modifier_string_format($_smarty_tpl->getVariable('billDetailCreditArray')->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec']['index']]['netWeight'],"%.0f");?>
<?php }else{ ?>&nbsp;<?php }?></td>
        <td align="right" style="border-right:1px;"><?php if ($_smarty_tpl->getVariable('billDetailCreditArray')->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec']['index']]['touch']!=0){?><?php echo smarty_modifier_string_format($_smarty_tpl->getVariable('billDetailCreditArray')->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec']['index']]['touch'],"%.2f");?>
<?php }else{ ?>&nbsp;<?php }?></td>
        <td align="right" style="border-right:1px;"><?php if ($_smarty_tpl->getVariable('billDetailCreditArray')->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec']['index']]['waste']!=0){?><?php echo smarty_modifier_string_format($_smarty_tpl->getVariable('billDetailCreditArray')->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec']['index']]['waste'],"%.2f");?>
<?php }else{ ?>&nbsp;<?php }?></td>
        <td align="right" style="border-right:1px;"><?php if ($_smarty_tpl->getVariable('billDetailCreditArray')->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec']['index']]['fine']!=0){?><?php echo smarty_modifier_string_format($_smarty_tpl->getVariable('billDetailCreditArray')->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec']['index']]['fine'],"%.0f");?>
<?php }else{ ?>&nbsp;<?php }?></td>
        <td align="right" style="border-right:1px;"><?php if ($_smarty_tpl->getVariable('billDetailCreditArray')->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec']['index']]['qty']!=0){?><?php echo smarty_modifier_string_format($_smarty_tpl->getVariable('billDetailCreditArray')->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec']['index']]['qty'],"%.0f");?>
<?php }else{ ?>&nbsp;<?php }?></td>
        <td align="right" style="border-right:1px;"><?php if ($_smarty_tpl->getVariable('billDetailCreditArray')->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec']['index']]['labour']!=0){?><?php echo smarty_modifier_string_format($_smarty_tpl->getVariable('billDetailCreditArray')->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec']['index']]['labour'],"%.0f");?>
<?php }else{ ?>&nbsp;<?php }?></td>
        <td align="right" style="border-right:1px;"><?php if ($_smarty_tpl->getVariable('billDetailCreditArray')->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec']['index']]['amount']!=0){?><?php echo smarty_modifier_string_format($_smarty_tpl->getVariable('billDetailCreditArray')->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec']['index']]['amount'],"%.0f");?>
<?php }else{ ?>&nbsp;<?php }?></td>
      </tr>
      <?php endfor; endif; ?>
      <?php unset($_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]);
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['name'] = "sec1";
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['loop'] = is_array($_loop=$_smarty_tpl->getVariable('extraBillDetailCredit')->value) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['show'] = true;
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['max'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['loop'];
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['step'] = 1;
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['start'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['step'] > 0 ? 0 : $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['loop']-1;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['show']) {
    $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['total'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['loop'];
    if ($_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['total'] == 0)
        $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['show'] = false;
} else
    $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['total'] = 0;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['show']):

            for ($_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['index'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['start'], $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['iteration'] = 1;
                 $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['iteration'] <= $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['total'];
                 $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['index'] += $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['step'], $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['iteration']++):
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['rownum'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['iteration'];
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['index_prev'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['index'] - $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['index_next'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['index'] + $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['first']      = ($_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['iteration'] == 1);
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['last']       = ($_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['iteration'] == $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['total']);
?>
      <?php endfor; endif; ?>
      <tr>
        <td colspan="10"><hr COLOR="#000000" /></td>
      </tr>
      <tr class="table1">
        <td style="border-right:1px;" align="right" >Total :&nbsp;&nbsp;&nbsp;</td>
        <?php if ($_GET['print']!=1){?>
          <td style="border-right:1px;">&nbsp;</td>
          <td style="border-right:1px;">&nbsp;</td>
          <td style="border-right:1px;">&nbsp;</td>
          <td style="border-right:1px;">&nbsp;</td>
          <td style="border-right:1px;">&nbsp;</td>
        <?php }else{ ?>
          <td style="border-right:1px;">&nbsp;</td>
          <td style="border-right:1px;">&nbsp;</td>
          <td style="border-right:1px;">&nbsp;</td>
          <td style="border-right:1px;">&nbsp;</td>
        <?php }?> 
        <td align="right" style="border-right:1px;"><?php echo smarty_modifier_string_format($_smarty_tpl->getVariable('totalFineCr')->value,"%.0f");?>
</td>
        <td style="border-right:1px;">&nbsp;</td>
        <td style="border-right:1px;">&nbsp;</td>
        <td align="right" style="border-right:1px;"><?php echo smarty_modifier_string_format($_smarty_tpl->getVariable('totalAmountCr')->value,"%.0f");?>
</td>
      </tr>
    </table>
    </td>
  <?php if ($_GET['print']!=1){?>
  <?php }else{ ?>
  <tr class="table2">
    <td colspan="10"><hr COLOR="#000000" /></td></tr>
  <?php }?>
  <tr class="table1">
    <th colspan="2" align="center" class="javakColor">Javak</th>
  </tr>    
    <td  style="border-right:1px;" vAlign="top" colspan="2">
    <table border="2" align="center" width="100%" cellspacing="0" cellpadding="1"  class="javakColor">
      <tr class="table1">
        <?php if ($_GET['print']!=1){?>
      	  <td style="border-right:1px;" width="8%">&nbsp;</td>
      	<?php }else{ ?>
          &nbsp;
        <?php }?>
        <td width="10%" align="center" style="border-right:1px;">Date</td>
        <td width="27%" align="center" style="border-right:1px;">Particulars</td>
        <td width="8%" align="center" style="border-right:1px;">N.Wght</td>
        <td width="8%" align="center" style="border-right:1px;">Touch</td>
        <td width="8%" align="center" style="border-right:1px;">Waste</td>
        <td width="8%" align="center" style="border-right:1px;">Fine</td>
        <td width="8%" align="center" style="border-right:1px;">Qty</td>
        <td width="8%" align="center" style="border-right:1px;">Labour</td>
        <td align="center" style="border-right:1px;">Amt</td>
      </tr>
      <tr class="table1">
      	<?php if ($_GET['print']!=1){?>
      	  <td align="right">&nbsp;</td>
      	<?php }?>  
        <td align="right" style="border-right:1px;">&nbsp;</td> 
        <td align="center" style="border-right:1px;">Opening</td>
        <td align="right" style="border-right:1px;">&nbsp;</td>
        <td align="right" style="border-right:1px;">&nbsp;</td>
        <td align="right" style="border-right:1px;">&nbsp;</td>
        <td align="right" style="border-right:1px;">&nbsp;</td>
        <td align="right" style="border-right:1px;">&nbsp;</td>
        <td align="right" style="border-right:1px;"><?php if ($_smarty_tpl->getVariable('openingFinalFineDr')->value!=0){?><?php echo smarty_modifier_string_format($_smarty_tpl->getVariable('openingFinalFineDr')->value,"%.0f");?>
<?php }else{ ?>&nbsp;<?php }?></td>
        <td align="right" style="border-right:1px;"><?php if ($_smarty_tpl->getVariable('openingFinalAmountDr')->value!=0){?><?php echo smarty_modifier_string_format($_smarty_tpl->getVariable('openingFinalAmountDr')->value,"%.0f");?>
<?php }else{ ?>&nbsp;<?php }?></td>
      </tr>
      <?php unset($_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]);
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['name'] = "sec1";
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['loop'] = is_array($_loop=count($_smarty_tpl->getVariable('billDetailDebitArray')->value)) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['show'] = true;
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['max'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['loop'];
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['step'] = 1;
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['start'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['step'] > 0 ? 0 : $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['loop']-1;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['show']) {
    $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['total'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['loop'];
    if ($_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['total'] == 0)
        $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['show'] = false;
} else
    $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['total'] = 0;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['show']):

            for ($_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['index'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['start'], $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['iteration'] = 1;
                 $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['iteration'] <= $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['total'];
                 $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['index'] += $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['step'], $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['iteration']++):
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['rownum'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['iteration'];
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['index_prev'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['index'] - $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['index_next'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['index'] + $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['first']      = ($_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['iteration'] == 1);
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['last']       = ($_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['iteration'] == $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['total']);
?>
      <tr>
        <?php if ($_GET['print']!=1){?>
          <?php if ($_smarty_tpl->getVariable('billDetailDebitArray')->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec1']['index']]['billNo']<=0){?>
		        <td>
		          <?php if ($_smarty_tpl->getVariable('billDetailDebitArray')->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec1']['index']]['vepaariBookMasterId']!=$_smarty_tpl->getVariable('billDetailDebitArray')->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec1']['index']-1]['vepaariBookMasterId']){?>
		            <a href="vepaariBookListNewJavak.php?print=1&vepaariBookMasterId=<?php echo $_smarty_tpl->getVariable('billDetailDebitArray')->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec1']['index']]['vepaariBookMasterId'];?>
&partyId=<?php echo $_smarty_tpl->getVariable('billDetailDebitArray')->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec1']['index']]['partyId'];?>
&vepaariBookDate=<?php echo $_smarty_tpl->getVariable('billDetailDebitArray')->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec1']['index']]['vepaariBookDate'];?>
">Print</a>
		          <?php }else{ ?>
		            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		          <?php }?>
		          <?php if ($_smarty_tpl->getVariable('billDetailDebitArray')->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec1']['index']]['vepaariBookMasterId']!=$_smarty_tpl->getVariable('billDetailDebitArray')->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec1']['index']-1]['vepaariBookMasterId']){?><a href="javascript:deleteRow(<?php echo $_smarty_tpl->getVariable('billDetailDebitArray')->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec1']['index']]['vepaariBookDetailId'];?>
)"><img src="./images/b_drop.png" border="0" width="15" height="15"></a>
		          <?php }else{ ?>
		            &nbsp;
		          <?php }?>
		          <?php if ($_smarty_tpl->getVariable('billDetailDebitArray')->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec1']['index']]['vepaariBookMasterId']!=$_smarty_tpl->getVariable('billDetailDebitArray')->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec1']['index']-1]['vepaariBookMasterId']){?><a href="vepaariBookJaavak.php?vepaariBookMasterId=<?php echo $_smarty_tpl->getVariable('billDetailDebitArray')->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec1']['index']]['vepaariBookMasterId'];?>
"><img src="./images/b_edit.png" border="0" width="15" height="15"></a>
		          <?php }else{ ?>
		            &nbsp;
		          <?php }?>
		        </td>
		      <?php }else{ ?>  
		        <td align="right">&nbsp;</td>
          <?php }?>
        <?php }else{ ?>
          &nbsp;
        <?php }?>
        <td align="center" style="border-right:1px;"  nowrap>&nbsp;<?php echo smarty_modifier_date_format($_smarty_tpl->getVariable('billDetailDebitArray')->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec1']['index']]['vepaariBookDate'],"%d-%m-%Y");?>
</td>
        <?php if ($_smarty_tpl->getVariable('billDetailDebitArray')->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec1']['index']]['billNo']!=0){?>
        <td align="right" style="border-right:1px;">Bill No<?php echo $_smarty_tpl->getVariable('billDetailDebitArray')->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec1']['index']]['billNo'];?>
</td>
        <?php }else{ ?>
        <td align="left" style="border-right:1px;"><?php echo $_smarty_tpl->getVariable('billDetailDebitArray')->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec1']['index']]['particulars'];?>
</td>
        <?php }?>
        <td align="right" style="border-right:1px;"><?php if ($_smarty_tpl->getVariable('billDetailDebitArray')->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec1']['index']]['netWeight']!=0){?><?php echo smarty_modifier_string_format($_smarty_tpl->getVariable('billDetailDebitArray')->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec1']['index']]['netWeight'],"%.0f");?>
<?php }else{ ?>&nbsp;<?php }?></td>
        <td align="right" style="border-right:1px;"><?php if ($_smarty_tpl->getVariable('billDetailDebitArray')->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec1']['index']]['touch']!=0){?><?php echo smarty_modifier_string_format($_smarty_tpl->getVariable('billDetailDebitArray')->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec1']['index']]['touch'],"%.2f");?>
<?php }else{ ?>&nbsp;<?php }?></td>
        <td align="right" style="border-right:1px;"><?php if ($_smarty_tpl->getVariable('billDetailDebitArray')->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec1']['index']]['waste']!=0){?><?php echo smarty_modifier_string_format($_smarty_tpl->getVariable('billDetailDebitArray')->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec1']['index']]['waste'],"%.2f");?>
<?php }else{ ?>&nbsp;<?php }?></td>
        <td align="right" style="border-right:1px;"><?php if ($_smarty_tpl->getVariable('billDetailDebitArray')->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec1']['index']]['fine']!=0){?><?php echo smarty_modifier_string_format($_smarty_tpl->getVariable('billDetailDebitArray')->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec1']['index']]['fine'],"%.0f");?>
<?php }else{ ?>&nbsp;<?php }?></td>
        <td align="right" style="border-right:1px;"><?php if ($_smarty_tpl->getVariable('billDetailDebitArray')->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec1']['index']]['qty']!=0){?><?php echo smarty_modifier_string_format($_smarty_tpl->getVariable('billDetailDebitArray')->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec1']['index']]['qty'],"%.0f");?>
<?php }else{ ?>&nbsp;<?php }?></td>
        <td align="right" style="border-right:1px;"><?php if ($_smarty_tpl->getVariable('billDetailDebitArray')->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec1']['index']]['labour']!=0){?><?php echo smarty_modifier_string_format($_smarty_tpl->getVariable('billDetailDebitArray')->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec1']['index']]['labour'],"%.0f");?>
<?php }else{ ?>&nbsp;<?php }?></td>
        <td align="right" style="border-right:1px;"><?php if ($_smarty_tpl->getVariable('billDetailDebitArray')->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec1']['index']]['amount']!=0){?><?php echo smarty_modifier_string_format($_smarty_tpl->getVariable('billDetailDebitArray')->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec1']['index']]['amount'],"%.0f");?>
<?php }else{ ?>&nbsp;<?php }?></td>
      </tr>
      <?php endfor; endif; ?>
      <?php unset($_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]);
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['name'] = "sec1";
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['loop'] = is_array($_loop=$_smarty_tpl->getVariable('extraBillDetailDebit')->value) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['show'] = true;
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['max'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['loop'];
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['step'] = 1;
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['start'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['step'] > 0 ? 0 : $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['loop']-1;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['show']) {
    $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['total'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['loop'];
    if ($_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['total'] == 0)
        $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['show'] = false;
} else
    $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['total'] = 0;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['show']):

            for ($_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['index'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['start'], $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['iteration'] = 1;
                 $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['iteration'] <= $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['total'];
                 $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['index'] += $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['step'], $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['iteration']++):
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['rownum'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['iteration'];
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['index_prev'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['index'] - $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['index_next'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['index'] + $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['first']      = ($_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['iteration'] == 1);
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['last']       = ($_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['iteration'] == $_smarty_tpl->tpl_vars['smarty']->value['section']["sec1"]['total']);
?>
      <?php endfor; endif; ?>
		  <tr>
		    <td colspan="10"><hr COLOR="#000000" /></td>
		  </tr>
      <tr class="table1">
        <td align="right" style="border-right:1px;">Total :&nbsp;&nbsp;&nbsp; </td>
        <?php if ($_GET['print']!=1){?>
          <td style="border-right:1px;">&nbsp;</td>
          <td style="border-right:1px;">&nbsp;</td>
          <td style="border-right:1px;">&nbsp;</td>
          <td style="border-right:1px;">&nbsp;</td>
          <td style="border-right:1px;">&nbsp;</td>
          <?php }else{ ?>
          <td style="border-right:1px;">&nbsp;</td>
          <td style="border-right:1px;">&nbsp;</td>
          <td style="border-right:1px;">&nbsp;</td>
          <td style="border-right:1px;">&nbsp;</td>
        <?php }?> 
          <td align="right" style="border-right:1px;"><?php echo smarty_modifier_string_format($_smarty_tpl->getVariable('totalFineDr')->value,"%.0f");?>
</td>
          <td style="border-right:1px;">&nbsp;</td>
          <td style="border-right:1px;">&nbsp;</td>
          <td align="right" style="border-right:1px;"><?php echo smarty_modifier_string_format($_smarty_tpl->getVariable('totalAmountDr')->value,"%.0f");?>
</td>
      </tr>
    </table>
    </td>
  </tr>
  </table>
  <table>
  <tr align="left">
  <td align="left">
    <b style="color:green;"><?php if ($_smarty_tpl->getVariable('total')->value['totFine']>=0){?> Total Debit Fine:<?php }else{ ?></b><b style="color:red;"> Total Credit Fine:<?php }?> <?php echo smarty_modifier_string_format($_smarty_tpl->getVariable('total')->value['totFine'],"%.0f");?>
</b><br>
    <b style="color:green;"><?php if ($_smarty_tpl->getVariable('total')->value['totAmount']>=0){?> Total Debit Amount:<?php }else{ ?></b><b style="color:red;"> Total Credit Amount:<?php }?> <?php echo smarty_modifier_string_format($_smarty_tpl->getVariable('total')->value['totAmount'],"%.0f");?>
</b>
  </td>
  </tr>
</table>   
  </div>
</form>
<?php if ($_GET['print']!=1){?>
  <?php $_template = new Smarty_Internal_Template("footer.tpl", $_smarty_tpl->smarty, $_smarty_tpl, $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null);
 echo $_template->getRenderedTemplate();?><?php $_template->updateParentVariables(0);?><?php unset($_template);?>
<?php }?>
